<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<%include("/common/include.html"){}%>
		<style type="text/css">
			ul{
				height:auto;
				width:100%;
				padding:10px;
			}
			ul li{
				width:230px;
				display:inline-block;
			}
		</style>
	</head>
	<body style="overflow-x:hidden;">
	<input id="ORGANIDS"  type="hidden" value="${orgid!}">
		<form>
		<%include("/commonUtil/ddcSearchBusiness.html"){}%>
		</form>
		<div data-options="region:'center'" style="overflow-x:hidden;">
		<table class="easyui-datagrid" id ="announceInfo" style="width:100%;height:auto;"></table>
		</div>
		
		<script>
		
		
		
		function queryBusiness(){
			$('#announceInfo').datagrid({
				cls: "theme-datagrid",
				title:"待归档业务",
				singleSelect: true,
				rownumbers: true, //显示序号
				fitColumns:true,
				pagination: true,
				pageSize: 10,
				url: "zcdjgd/getlist",
				queryParams: {
					'_query.NEWHPHM': $("#HPHM").val(),
					'_query.LSH': $("#LSH").val(),
					'_query.ORGANIDS': $("#ORGANIDS").val(),
					'_query.STATUS':3,
					'_query.TYPE':3,
				},
			    method: 'post',
			    collapsible:true,
			    columns:[[
							{field:'lsh',title:'业务流水号',width:20,align:'center'},
							{field:'cllx',title:'车辆类型',width:10,align:'center'},
							{field:'newhphm',title:'号牌号码',width:8,align:'center'},
							{field:'newownername',title:'车辆所有人',width:15, align:'center'},
							{field:'organname',title:'制证机构',width:15, align:'center'},
							{field:'zzdate',title:'制证日期',width:10, align:'center'},
							{field:'zzjbr',title:'经办人',width:7, align:'center'},
							{field:'operate1',title:'操作',width:10, align:'center',
								formatter: function(value,row,index){
									return '<a onclick='+'details(\'' + row.ids + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>详情</span></span></a>'
								}
							},
							{field:'operate2',title:'业务办理',width:10, align:'center',
								formatter: function(value,row,index){
									return '<a onclick='+'gd(\'' + row.ids + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>归档</span></span></a>'
								}
							}
							]]
			})
			
		}		
		
		$(document).ready(function () {
			$("#HPHM").combobox({
				onChange: function (n,o) {
					$("#LSH").textbox("clear");
					//$("#SFZMHM").textbox("clear");
					 queryBusiness();
				}
			});
			$("#LSH").combobox({
				onChange: function (n,o) {
					$("#HPHM").textbox("clear");
					//$("#SFZMHM").textbox("clear");
					 queryBusiness();
				}
			});
			/* $("#SFZMHM").combobox({
				onChange: function (n,o) {
					$("#HPHM").textbox("clear");
					$("#LSH").textbox("clear");
					 queryCustomer();
				}
			}); */
			queryBusiness();
		});
		
		function clearsj(){
			location.reload();
		}
		
		
		function details(ids){
			loadViewDialog('业务详情', '${cxt !}/bgdjgd/details?ids=' + ids,null,1100,550);
		}
		
		function gd(ids){
			 parent.$.messager.confirm('提示信息','确定归档？',function(r){
				if (r){
					$.post("bgdjgd/togd",{"ids":ids},function(result){
						$('#announceInfo').datagrid('reload');
					});
				}
			 });
		}
		</script>
	</body>
</html>
